﻿using ConfExpert.Utility;
using DevTeam;

using System;
namespace ConfExpert.Forms
{
    public partial class InTransit : XPopupForm
    {

        //BindingSource bs;
        public InTransit(int ProductId)
        {
            InitializeComponent();
            gridView1.Init("GetInTransit", ProductId);

            txtInfo.Caption = AppSession.Lookups.V_Kumas.FindByProductId(ProductId).Name;
        }

        public InTransit(string StokKodu)
        {
            InitializeComponent();
            gridView1.Init("GetInTransitDR", StokKodu);

            txtInfo.Caption = StokKodu;
        }


        private void InTransit_Load(object sender, EventArgs e)
        {
            gridView1.MakeColumnInvisible("ProductId", "idx");

            gridView1.FormatAsDate("ETAVarisTarihi");
            gridView1.FormatAsNumber(1, "OrderMt", "GelenMt", "BeklenenMt", "YuklenenMt");
            gridView1.AddSummary("OrderMt", "GelenMt", "BeklenenMt", "YuklenenMt");

            gridView1.SetCaptions("OrderMt:Sipariş Edilen Metraj", "GelenMt:Gelen Metraj", "BeklenenMt:Beklenen Metraj", "YuklenenMt:Yüklenen Metraj", "ETAVarisTarihi:ETA", "xTerminAciklama:Termin Not", "UreticiId:Üretici", "UreticiKodu:Üretici Kodu", "MusteriKodu:Müşteri Kodu");
            gridView1.BestFitColumns();
        }
    }
}